/*****************************************************************************
Filename    : main.c
Author      : Terrantsh (tanshanhe@foxmail.com)
Date        : 2018-9-25 11:19:48
Description : Rsa4096
*****************************************************************************/
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include "private.h"

int main(int argc, char const *argv[])
{
    clock_t start, finish;
    double  duration;
    start = clock();


    unsigned char input [256] = {0x22,0x21,0x12,0xed,0xf2};        // message to encrypt
    private_encrypt(input);

    char base64[] = "N0I2NzJENEM5QjM2REFCMzJBNUU3MkQxNUNBM0Y2MkI5RjY0RTAyRUExODJBNzkyQkE0MzA5OTdDREY0RjA1MjA2RDJDMkZFQThFRDNGMkY5OTRDOTM3MkQzRTI3MkY3NTMxMDg5MTgzRUQ1REJCMDAwQkNBQkZGRjRDMkE3MkNFMkM4NTI2QjdEQTY5MTQ2MzBFMTcxQzQyRUQ0RDcyODlDOTdBQUEwRjYxNTAwMkFCRUIyNDg2Q0NCMzVGQUFDQjg0QjI1Q0FGREQwOUZGRkE5OTE2RUNCOTVDQjc3N0Q0RjI1N0ZEODE1RDQzMkI1M0MyM0JBOTlGRUJBMUY3NDRDRTNGMDgxMzdGODBDMUMzRjczNjkzNUExNUNDRUEzMjE1ODRERTREQTUzNUI0OUM4NTMwQUExOUVGMzVGREQzMDlGMzQ3NkM4MzQ3MUJFQUMyNTVCMTM2RDg3NTc2OUYzNzg1MzY1RUM4RTcyOEUyMDUzQjBCNDc4ODU3N0U4NkQ5MUJGN0MwRDcxOEMzN0NCREEyQ0E2QUYwQTJCMDIwMUZFNUI4MUFGNDE2MEU2QzM2NTlCMDBGRTAwNkRFQTk3MzI0QjUwMTc0MERCNERGNUFERjFCQjY2OTMyMTE1RjZEMEVBODQ0MjZFRkQyRjIyMTkxRDk4RjMzODdFRUI5OTREMDA2QkY1RTU3M0QzRDhGNjBDQjM0OEQ1MkVFMDI1NjcwRUI5MEVCODJBMjIwQTg5MUM2MzJGMzUzMjdEQTg0QTYxNEJDODZCRTUwMDk5QTIxMzU2M0Q3NjU0Q0MyODNCQzdDNjkzQTBGNEEyOEY5QkRFM0JDMjI1OTY2RjE0N0VGQkMwMzhDMEY0MzkzNDc2RDM3ODRCQTZFRjY4MDBBRjQ1ODg2OTM4Q0RBMzAyM0I1NUFDOEQwNDZENDU3QUJFRTI0MzQ1RUVCNkY5RkY5NTNGQjcwQjYzREI2NTkxQzYyNEJBQzQ5OTBCOUZEMUUzMTc0MUFGMTBBNkVGRURBNUFCREI2NkVBNEQ3MDI5RjNCNzMzQTBCOEU3MkY2QUI3QjMxMjJBQ0Q1NTVGREI2ODk2MDM1OUUwODhCRUJBNkREMDIwMDk4NzVCREI3MzM1Mzg5QzJENEY4QjlFNTdFNjIyRDJBRjlFQzNENTg1RTc5MDQwQkUzRDRCMUVBMTAzODk1QTA3MDM1QjQ3QjJGQUI3MTMxOEQ5QkNBNjVEOUQ1RjQxMUQyMDA1ODg4QzQ3MkMzNTc2QjREMTNEMTdDQTk4OUMyNzM0REExQjkxRTFCQjI3NzQ4RUI2NzQwN0IxNENFRjFBODdDREQ5MDkxOEIwNDk0NkU0Njc1RA==";
    private_decrypt(base64);

    
    finish = clock();
    duration = (double)(finish - start) / CLOCKS_PER_SEC;   // print the time about the process
    printf( "%f seconds\n", duration );

    return 0;
}
